package com.ruoyi.wisdom.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.wisdom.mapper.IotSchoolHeadteacherMapper;
import com.ruoyi.wisdom.domain.IotSchoolHeadteacher;
import com.ruoyi.wisdom.service.IIotSchoolHeadteacherService;

/**
 * 班主任管理Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-02-10
 */
@Service
public class IotSchoolHeadteacherServiceImpl implements IIotSchoolHeadteacherService 
{
    @Autowired
    private IotSchoolHeadteacherMapper iotSchoolHeadteacherMapper;

    /**
     * 查询班主任管理
     * 
     * @param id 班主任管理主键
     * @return 班主任管理
     */
    @Override
    public IotSchoolHeadteacher selectIotSchoolHeadteacherById(Long id)
    {
        return iotSchoolHeadteacherMapper.selectIotSchoolHeadteacherById(id);
    }

    /**
     * 查询班主任管理列表
     * 
     * @param iotSchoolHeadteacher 班主任管理
     * @return 班主任管理
     */
    @Override
    public List<IotSchoolHeadteacher> selectIotSchoolHeadteacherList(IotSchoolHeadteacher iotSchoolHeadteacher)
    {
        return iotSchoolHeadteacherMapper.selectIotSchoolHeadteacherList(iotSchoolHeadteacher);
    }

    /**
     * 新增班主任管理
     * 
     * @param iotSchoolHeadteacher 班主任管理
     * @return 结果
     */
    @Override
    public int insertIotSchoolHeadteacher(IotSchoolHeadteacher iotSchoolHeadteacher)
    {
        iotSchoolHeadteacher.setCreateTime(DateUtils.getNowDate());
        return iotSchoolHeadteacherMapper.insertIotSchoolHeadteacher(iotSchoolHeadteacher);
    }

    /**
     * 修改班主任管理
     * 
     * @param iotSchoolHeadteacher 班主任管理
     * @return 结果
     */
    @Override
    public int updateIotSchoolHeadteacher(IotSchoolHeadteacher iotSchoolHeadteacher)
    {
        iotSchoolHeadteacher.setUpdateTime(DateUtils.getNowDate());
        return iotSchoolHeadteacherMapper.updateIotSchoolHeadteacher(iotSchoolHeadteacher);
    }

    /**
     * 批量删除班主任管理
     * 
     * @param ids 需要删除的班主任管理主键
     * @return 结果
     */
    @Override
    public int deleteIotSchoolHeadteacherByIds(Long[] ids)
    {
        return iotSchoolHeadteacherMapper.deleteIotSchoolHeadteacherByIds(ids);
    }

    /**
     * 删除班主任管理信息
     * 
     * @param id 班主任管理主键
     * @return 结果
     */
    @Override
    public int deleteIotSchoolHeadteacherById(Long id)
    {
        return iotSchoolHeadteacherMapper.deleteIotSchoolHeadteacherById(id);
    }
}
